var now = new Date('2018/7/1 8:30');
//设置时间
console.log(now.getDay());
//now.setFullYear(2021);
now.setMonth(9); // 0~11
//console.log(now.getDay());
console.log(now.toLocaleString())

/*
//转成本地时间格式
console.log(now.toLocaleString());
console.log(now.toLocaleDateString());
console.log(now.toLocaleTimeString());
//转成国际时间格式
console.log(now.toString());
console.log(now.toDateString());//年月日 星期
console.log(now.toTimeString());
*/